<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数返回值</title>
    <script type="text/javascript">
    function sum (i) {
        var sum=1;
        for(var j=1;j<=i;j++){
            sum*=j;
        }
        return sum;
    }
    function area(r) {
        return Math.PI*r*r;
    }
    alert(sum(10));
    document.write(sum(10)+"<br>");
    console.log(sum(10));
    document.write(area(10));
    </script>
</head>
<body>
    
</body>
</html>